# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月14日
"""
import openpyxl

myBook=openpyxl.load_workbook('利润表.xlsx')
mySum=sum([mySheet['B5'].value for mySheet in myBook])
mySheet2=myBook.copy_worksheet(myBook.worksheets[0])
mySheet2.title='全年利润表'
mySheet2['B5'].value=mySum
mySheet2['B6'].value=mySum
myBook.save('结果表-利润表.xlsx')